/** <b>odczytywanieBeanInfo.java</b> - Klasa BeanInfo - Meteo 1.0
 * Created on 2010-03-23, 5:15:08 */
import java.beans.*;

/** @author MACIEJ KOPLIN - 70482 TIiM, Wydział Elektroniki i Inforamtyki, Politechnika Koszalińska
* III rok, sem VI. Rok akademicki 2009/2010.
* @version Meteo 1.0*/

/** <b>odczytywanieBeanInfo.java</b> - Klasa odczytywanieBeanInfo dzieczy po SimpleBean Info - Meteo 1.0 */
public class odczytywanieBeanInfo extends SimpleBeanInfo {

    // Bean descriptor//GEN-FIRST:BeanDescriptor
    /*lazy BeanDescriptor*/
    private static BeanDescriptor getBdescriptor(){
        BeanDescriptor beanDescriptor = new BeanDescriptor  ( odczytywanie.class , null ); // NOI18N
        beanDescriptor.setDisplayName ( "Czujnik temp" );
        beanDescriptor.setShortDescription ( "Czujnik temp" );//GEN-HEADEREND:BeanDescriptor


        return beanDescriptor;     }//GEN-LAST:BeanDescriptor
 String iconColor16x16Filename="odczytywanie16.gif";
    String iconColor32x32Filename="odczytywanie32.gif";

    /** Metoda ustawia ikonę Ziarna w zależności od wersji
    * @param iconKind
    * @return zwaraca ikonę */
    public java.awt.Image getIcon(int iconKind) {
    switch (iconKind) {
          case BeanInfo.ICON_COLOR_16x16:
                return iconColor16x16Filename != null ? loadImage(iconColor16x16Filename) : null;
          case BeanInfo.ICON_COLOR_32x32:
                return iconColor32x32Filename != null ? loadImage(iconColor32x32Filename) : null;
          case BeanInfo.ICON_MONO_16x16:
                return iconColor16x16Filename != null ? loadImage(iconColor16x16Filename) : null;
          case BeanInfo.ICON_MONO_32x32:
                return iconColor32x32Filename != null ? loadImage(iconColor32x32Filename) : null;
         }
    return null;
    }

    // Property identifiers//GEN-FIRST:Properties
    private static final int PROPERTY_bit0 = 0;
    private static final int PROPERTY_bit1 = 1;
    private static final int PROPERTY_bit10 = 2;
    private static final int PROPERTY_bit11 = 3;
    private static final int PROPERTY_bit12 = 4;
    private static final int PROPERTY_bit13 = 5;
    private static final int PROPERTY_bit14 = 6;
    private static final int PROPERTY_bit15 = 7;
    private static final int PROPERTY_bit16 = 8;
    private static final int PROPERTY_bit17 = 9;
    private static final int PROPERTY_bit2 = 10;
    private static final int PROPERTY_bit3 = 11;
    private static final int PROPERTY_bit4 = 12;
    private static final int PROPERTY_bit5 = 13;
    private static final int PROPERTY_bit6 = 14;
    private static final int PROPERTY_bit7 = 15;
    private static final int PROPERTY_bit8 = 16;
    private static final int PROPERTY_bit9 = 17;
    private static final int PROPERTY_connected = 18;
    private static final int PROPERTY_connectedPort = 19;
    private static final int PROPERTY_jTextField2 = 20;
    private static final int PROPERTY_komunikat = 21;

    // Property array 
    /*lazy PropertyDescriptor*/
    private static PropertyDescriptor[] getPdescriptor(){
        PropertyDescriptor[] properties = new PropertyDescriptor[22];
    
        try {
            properties[PROPERTY_bit0] = new PropertyDescriptor ( "bit0", odczytywanie.class, null, "setBit0" ); // NOI18N
            properties[PROPERTY_bit1] = new PropertyDescriptor ( "bit1", odczytywanie.class, null, "setBit1" ); // NOI18N
            properties[PROPERTY_bit10] = new PropertyDescriptor ( "bit10", odczytywanie.class, null, "setBit10" ); // NOI18N
            properties[PROPERTY_bit11] = new PropertyDescriptor ( "bit11", odczytywanie.class, null, "setBit11" ); // NOI18N
            properties[PROPERTY_bit12] = new PropertyDescriptor ( "bit12", odczytywanie.class, null, "setBit12" ); // NOI18N
            properties[PROPERTY_bit13] = new PropertyDescriptor ( "bit13", odczytywanie.class, null, "setBit13" ); // NOI18N
            properties[PROPERTY_bit14] = new PropertyDescriptor ( "bit14", odczytywanie.class, null, "setBit14" ); // NOI18N
            properties[PROPERTY_bit15] = new PropertyDescriptor ( "bit15", odczytywanie.class, null, "setBit15" ); // NOI18N
            properties[PROPERTY_bit16] = new PropertyDescriptor ( "bit16", odczytywanie.class, null, "setBit16" ); // NOI18N
            properties[PROPERTY_bit17] = new PropertyDescriptor ( "bit17", odczytywanie.class, null, "setBit17" ); // NOI18N
            properties[PROPERTY_bit2] = new PropertyDescriptor ( "bit2", odczytywanie.class, null, "setBit2" ); // NOI18N
            properties[PROPERTY_bit3] = new PropertyDescriptor ( "bit3", odczytywanie.class, null, "setBit3" ); // NOI18N
            properties[PROPERTY_bit4] = new PropertyDescriptor ( "bit4", odczytywanie.class, null, "setBit4" ); // NOI18N
            properties[PROPERTY_bit5] = new PropertyDescriptor ( "bit5", odczytywanie.class, null, "setBit5" ); // NOI18N
            properties[PROPERTY_bit6] = new PropertyDescriptor ( "bit6", odczytywanie.class, null, "setBit6" ); // NOI18N
            properties[PROPERTY_bit7] = new PropertyDescriptor ( "bit7", odczytywanie.class, null, "setBit7" ); // NOI18N
            properties[PROPERTY_bit8] = new PropertyDescriptor ( "bit8", odczytywanie.class, null, "setBit8" ); // NOI18N
            properties[PROPERTY_bit9] = new PropertyDescriptor ( "bit9", odczytywanie.class, null, "setBit9" ); // NOI18N
            properties[PROPERTY_connected] = new PropertyDescriptor ( "connected", odczytywanie.class, "isConnected", null ); // NOI18N
            properties[PROPERTY_connectedPort] = new PropertyDescriptor ( "connectedPort", odczytywanie.class, "getConnectedPort", null ); // NOI18N
            properties[PROPERTY_jTextField2] = new PropertyDescriptor ( "jTextField2", odczytywanie.class, null, "setjTextField2" ); // NOI18N
            properties[PROPERTY_jTextField2].setDisplayName ( "LCD" );
            properties[PROPERTY_jTextField2].setShortDescription ( "LCD" );
            properties[PROPERTY_komunikat] = new PropertyDescriptor ( "komunikat", odczytywanie.class, "getKomunikat", null ); // NOI18N
            properties[PROPERTY_komunikat].setDisplayName ( "Komunikat" );
            properties[PROPERTY_komunikat].setShortDescription ( "Komunikat" );
        }
        catch(IntrospectionException e) {
            e.printStackTrace();
        }//GEN-HEADEREND:Properties

    // Here you can add code for customizing the properties array.

        return properties;     }//GEN-LAST:Properties

    // Event set information will be obtained from introspection.//GEN-FIRST:Events
    private static EventSetDescriptor[] eventSets = null;
    private static EventSetDescriptor[] getEdescriptor(){//GEN-HEADEREND:Events

    // Here you can add code for customizing the event sets array.

        return eventSets;     }//GEN-LAST:Events

    // Method information will be obtained from introspection.//GEN-FIRST:Methods
    private static MethodDescriptor[] methods = null;
    private static MethodDescriptor[] getMdescriptor(){//GEN-HEADEREND:Methods

    // Here you can add code for customizing the methods array.
    
        return methods;     }//GEN-LAST:Methods

    private static java.awt.Image iconColor16 = null;//GEN-BEGIN:IconsDef
    private static java.awt.Image iconColor32 = null;
    private static java.awt.Image iconMono16 = null;
    private static java.awt.Image iconMono32 = null;//GEN-END:IconsDef
    private static String iconNameC16 = null;//GEN-BEGIN:Icons
    private static String iconNameC32 = null;
    private static String iconNameM16 = null;
    private static String iconNameM32 = null;//GEN-END:Icons

    private static final int defaultPropertyIndex = -1;//GEN-BEGIN:Idx
    private static final int defaultEventIndex = -1;//GEN-END:Idx

    
//GEN-FIRST:Superclass

    // Here you can add code for customizing the Superclass BeanInfo.

//GEN-LAST:Superclass
	
    /**
     * Gets the bean's <code>BeanDescriptor</code>s.
     * 
     * @return BeanDescriptor describing the editable
     * properties of this bean.  May return null if the
     * information should be obtained by automatic analysis.
     */
    public BeanDescriptor getBeanDescriptor() {
	return getBdescriptor();
    }

    /**
     * Gets the bean's <code>PropertyDescriptor</code>s.
     * 
     * @return An array of PropertyDescriptors describing the editable
     * properties supported by this bean.  May return null if the
     * information should be obtained by automatic analysis.
     * <p>
     * If a property is indexed, then its entry in the result array will
     * belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor.
     * A client of getPropertyDescriptors can use "instanceof" to check
     * if a given PropertyDescriptor is an IndexedPropertyDescriptor.
     */
    public PropertyDescriptor[] getPropertyDescriptors() {
	return getPdescriptor();
    }

    /**
     * Gets the bean's <code>EventSetDescriptor</code>s.
     * 
     * @return  An array of EventSetDescriptors describing the kinds of 
     * events fired by this bean.  May return null if the information
     * should be obtained by automatic analysis.
     */
    public EventSetDescriptor[] getEventSetDescriptors() {
	return getEdescriptor();
    }

    /**
     * Gets the bean's <code>MethodDescriptor</code>s.
     * 
     * @return  An array of MethodDescriptors describing the methods 
     * implemented by this bean.  May return null if the information
     * should be obtained by automatic analysis.
     */
    public MethodDescriptor[] getMethodDescriptors() {
	return getMdescriptor();
    }

    /**
     * A bean may have a "default" property that is the property that will
     * mostly commonly be initially chosen for update by human's who are 
     * customizing the bean.
     * @return  Index of default property in the PropertyDescriptor array
     * 		returned by getPropertyDescriptors.
     * <P>	Returns -1 if there is no default property.
     */
    public int getDefaultPropertyIndex() {
        return defaultPropertyIndex;
    }

    /**
     * A bean may have a "default" event that is the event that will
     * mostly commonly be used by human's when using the bean. 
     * @return Index of default event in the EventSetDescriptor array
     *		returned by getEventSetDescriptors.
     * <P>	Returns -1 if there is no default event.
     */
    public int getDefaultEventIndex() {
        return defaultEventIndex;
    }

}
